package cc.yaomm.service.basic.service.user.bo;

import cc.yaomm.common.basic.enums.PermissionTypeEnum;
import cc.yaomm.common.basic.enums.StatusEnum;
import cc.yaomm.common.basic.lang.bo.BaseParamBO;
import cc.yaomm.common.basic.lang.bo.BaseResultBO;
import cc.yaomm.common.biz.enums.OwnerTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created by XQL on 2021/6/18.
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PermissionParamBO extends BaseParamBO {

    private Long id;

    @NotEmpty(message = "权限名称不能为空")
    @Size(max = 32, message = "权限名称不能超过32个字")
    private String name;

    @NotEmpty(message = "权限编码不能为空")
    @Size(max = 64, message = "权限编码不能超过64个字")
    private String code;

    @NotEmpty(message = "权限别名不能为空")
    @Size(max = 64, message = "权限别名不能超过64个字")
    private String alias;

    @NotEmpty(message = "权限路由不能为空")
    @Size(max = 64, message = "权限路由不能超过64个字")
    private String router;

    @NotNull(message = "权限类型不能为空")
    private PermissionTypeEnum type;

    private String icon;

    /**
     * 状态 1-正常 2-锁定 0-删除
     */
    private StatusEnum status;

    private Integer sort;

    @NotNull(message = "所属类型不能为空")
    private OwnerTypeEnum ownerType;

    /**
     * 关联资源
     */
    private Set<String> resources;
}
